from Systems.Planets.PlanetBodies import *

class PrimordialFactory(PlanetFactory):
    """ Promordial Planet are hot, mostly molten crust planets, that 
    just new formed and cooling. """ 
    
    def __init__(self):
        self.densityLower = 3.5 # random d in g/cm3 range 3.5 to 5.6
        self.densityUpper = 5.6
        self.massLower = .5 # .5 to 3.5 earths
        self.massUpper = 3.5
        
    def makePlanet(self):
        return self.randomPlanet("Primordial Planet", "A")

class BarrenFactory(PlanetFactory):
    """ moon like planets """
    
    def __init__(self):
        self.densityLower = 4
        self.densityUpper = 5.6
        self.massLower = .5
        self.massUpper = 4
    
    def makePlanet(self):
       return self.randomPlanet("Barren Planet", "B")

class Carbide(PlanetFactory):
    """ diamond planet or carbide planet, is a theoretical type of planet 
    proposed by Marc Kuchner that could form if protoplanetary discs are 
    carbon-rich and oxygen-poor. According to planetary science, it would 
    develop differently from Earth, Mars and Venus, planets made up mostly 
    of silicon-oxygen compounds"""    
    
    def __init__(self):
        self.densityLower = 5.3
        self.densityUpper = 6.5
        self.massLower = 1.5
        self.massUpper = 5
    
    def makePlanet(self):
       return self.randomPlanet("Carbide Planet", "C")
    
class LightTerrestrial(PlanetFactory):
    """ Mars like planets """
    
    def __init__(self):
        self.densityLower = 3.8 # random d in g/cm3 range 3.5 to 5.6
        self.densityUpper = 4.9
        self.massLower = .8 # .5 to 3.5 earths
        self.massUpper = 1.5
        
    def makePlanet(self):
        return self.randomPlanet("Terrestrial Planet", "D")

class MediumTerrestrial(PlanetFactory):
    """ Earth like planets """
           
    def __init__(self):
        self.densityLower = 5 # random d in g/cm3 range 3.5 to 5.6
        self.densityUpper = 5.6
        self.massLower = .8 # .5 to 3.5 earths
        self.massUpper = 1.5
        
    def makePlanet(self):
        return self.randomPlanet("Terrestrial Planet", "E")   
    
class DenseTerrestrial(PlanetFactory):
    """ Venus/Toxic Planets """
        
    def __init__(self):
        self.densityLower = 5.1 # random d in g/cm3 range 3.5 to 5.6
        self.densityUpper = 5.4
        self.massLower = .8 # .5 to 3.5 earths
        self.massUpper = 1.2
        
    def makePlanet(self):
        return self.randomPlanet("Terrestrial Planet", "F")
    
class GasGaint(PlanetFactory):
    """ ah... Gas Gaint planets """
            
    def __init__(self):
        self.densityLower = 0.8 # random d in g/cm3 range 3.5 to 5.6
        self.densityUpper = 1.7
        self.massLower = 15 # 320 earths is Jupiter
        self.massUpper = 420
        
    def makePlanet(self):
        return self.randomPlanet("Gas Gaint Planet", "G")

class PrimordialGaint(PlanetFactory):
    """ hot early gas gaint """
    
    def __init__(self):
        type = "Primordial Gas Gaint Planet"
        letterCode = "H"

class Chthonian(PlanetFactory):
    """ hypothetical class of celestial objects resulting from the stripping away 
    of a gas giant's hydrogen and helium atmosphere. Such atmospheric stripping is a 
    likely result of close proximity to a star. The remaining rocky or metallic core 
    would resemble a terrestrial planet in many respects """
    
    def __init__(self):
        type = "Chthonian Planet"
        letterCode = "I"
        
class Eccentric(PlanetFactory):
    """ An Eccentric Jupiter is a Jovian planet that orbits its star in a highly 
    eccentric orbit, much like a comet. Eccentric Jupiters, like Hot Jupiters, are 
    likely to disqualify a planetary system from having earth-like planets in it because 
    a planet as massive as Jupiter can, given sufficient time, throw all planets of 
    earth-like mass out of the system.
    
    To date, it appears that approximately 7% of all stars have an Eccentric Jupiter 
    planet, making these planets much more common than Hot Jupiters
    """
    
    def __init__(self):
        type = "Eccentric Gas Gaint Planet"
        letterCode = "J"
        
        
class Mesoplanet(PlanetFactory):
    """ sizes smaller than Mercury but larger than Ceres """
    
    def __init__(self):
        type = "Mesoplanet"
        letterCode = "M"

class Foam(PlanetFactory):
    """ Planetary object that forms with a mixture of rock and trapped gases. 
    This gives the planet a overall low density and gravity"""
    
    def __init(self):
        type = "Foam Planet"
        letterCode = "N"

class Ocean(PlanetFactory):
    """ Planetary objects that form in the outer solar system begin as a 
    comet-like mixture of roughly 50% water and 50% rock by weight The 
    oceans on such planets could be hundreds of kilometers deep, much deeper 
    than the oceans of Earth. The immense pressures in the lower regions 
    of these oceans could lead to the formation of a mantle of exotic forms 
    of ice. """
    
    def __init__(self):
        type = "Ocean Planet"
        letterCode = "O"
                
class Puffy(PlanetFactory):
    """ class of gas giant planets that have density less than 0.5 g/cm3. Puffy planets 
    often orbit close to their stars because the intense heat from the star and internal 
    heat within the planet bloat planet's atmosphere as in thermal expansion """
    
    def __init__(self):
        type = "Puffy Planet"
        letterCode = "P"
    
class Proto(PlanetFactory):
    """ Protoplanets are moon-sized planets, or larger embryos within protoplanetary discs. 
    They are believed to form out of kilometer-sized planetesimals that attract each other 
    gravitationally and collide."""
    
    def __init__(self):
        type = "Protoplanet"
        letterCode = "Q" 

class dwarf(PlanetFactory):
    """ is a celestial body orbiting the Sun that is massive enough to be rounded 
    by its own gravity but which has not cleared its neighbouring region of planetesimals and is 
    not a satellite. More explicitly, it has to have sufficient mass to overcome rigid body forces 
    and achieve hydrostatic equilibrium. """
    
    def __init__(self):
        type = "Dwarf Planet"
        letterCode = "R"
        
class massive(PlanetFactory):
    """ This celestial body is the trap core of a old star, super dense and has massive gravitational pull.
    It also tends to have massive magnetic field and radiation levels """
    
    def __init__(self):
        type = "Massive Core Planet"
        letterCode = "X"